<%@page contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>车辆信息</title>
<%@ include file="../common/common.jsp"%>
<script type="text/javascript">
var basePath=<%=request.getContextPath()+"/"%>;

$(function(){
    var height = window.document.body.offsetHeight-50;
	$('#client_info').datagrid({ 
		height:height,
		fitColumns:true,
		//fit:true,
		pagination:true,//分页数据
		rownumbers: true,
		loadMsg:'正在加载数据,请稍后',
		pageSize:10,
		url:basePath+'contractInfoAction!loadMainContractInfo.do',
		toolbar:[{text:"新增",iconCls:"icon-add",handler:function(){
			$('#win').window('open');
			
		}},{text:"编辑",iconCls:"icon-edit",handler:function(){
			$('#win').window('open');
		}},{text:"删除",iconCls:"icon-no",handler:function(){
			 $.messager.confirm('信息提示','你是否要删除当前选中数据?',function(r){  
				  if(r){
					  $.messager.alert('信息提示','删除成功');
				  }
			 });
		}},{text:"车辆相关信息",iconCls:"icon-add",handler:function(){
			$('#relation_win').window('open');
		}},{text:"高级查询",iconCls:"icon-search",handler:function(){
		
		}}],
		columns:[[  
		          {field:'clientcode',title:'车牌号',width:100},  
		          {field:'clientname',title:'车架号',width:100},  
		          {field:'clientcontract',title:'发动机号',width:100},  
		          {field:'clientcomaddr',title:'里程数',width:100},  
		          {field:'clientsellname',title:'驾驶员名称',width:100},
		          {field:'clientcode',title:'驾驶员联系方式',width:100},  
		          {field:'clientname',title:'费用信息',width:100}
	    ]]

	});
	
	 $('#win').window({  
		 closable:true,
		 modal:true  
	 });

	$('#add_close').click(function(){
		$('#win').window('close');
	});
	
	 $('#relation_win').window({  
		 closable:true,
		 modal:true  
	 });
});
</script>
</head>
<body class="easyui-layout">
<div id="win"  class="easyui-dialog" title="新增车辆信息" closed="true" minimizable="false"
 maximizable="false" collapsible="false" style="width:650px;height:400px;padding:5px;" href=car_manager_form.jsp>
</div>

<div id="relation_win"  class="easyui-dialog" title="车辆相关信息" closed="true" minimizable="false"
 maximizable="false" collapsible="false" style="width:650px;height:400px;padding:5px;" href=car_info_form.jsp>
</div>
 
   <div region="center"  title="车辆信息" closable="false" >
	 <table id="client_info"></table>  
  </div>
</body>
</html>